package com.zzt.zt_hilt.Module;

import com.zzt.zt_hilt.entity.Student;

import dagger.Module;
import dagger.Provides;
import dagger.hilt.InstallIn;
import dagger.hilt.android.components.ActivityComponent;
import dagger.hilt.android.scopes.ActivityScoped;

/**
 * @author: zeting
 * @date: 2022/8/30
 */
@InstallIn(ActivityComponent.class)
@Module
public class StudentModel {

    @Provides // 暴露对象
    @ActivityScoped//上方是ActivityComponent用这个注解，作用是保持局部单例
    public Student getStudent() {
        return new Student();
    }
}
